package com.sg.dto.biz.calc.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc MemoryBusinessResDataDto
 * @使用场景
 */
@Data
public class MemoryBusinessResDataDto extends BaseDto implements Serializable {

    /**
     * 字段名
     */
    @ApiModelProperty("字段名")
    private String fieldName;

    /**
     * 字段值
     */
    @ApiModelProperty("字段值")
    private String fieldValue;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        MemoryBusinessResDataDto that = (MemoryBusinessResDataDto) o;
        return fieldName == that.fieldName && fieldValue == that.fieldValue;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), fieldName, fieldValue);
    }

}
